﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Liger.Web.UI
{
    public class GridClientEvents
    {
        /// <summary>
        /// 拖动列事件
        /// </summary>
        public static string OnDragCol = "DragCol";

        /// <summary>
        /// 切换列事件
        /// </summary>
        public static string OnToggleCol = "ToggleCol";

        /// <summary>
        /// 改变排序事件
        /// </summary>
        public static string OnChangeSort = "ChangeSort";


        /// <summary>
        /// 成功获取服务器数据的事件
        /// </summary>
        public static string OnSuccess = "Success";
        /// <summary>
        /// 双击行事件
        /// </summary>
        public static string OnDblClickRow = "DblClickRow";
        /// <summary>
        /// 选择行事件
        /// </summary>
        public static string OnSelectRow = "SelectRow";
        /// <summary>
        /// 取消选择行事件
        /// </summary>
        public static string OnUnSelectRow = "UnSelectRow";
        /// <summary>
        /// 选择前事件，可以通过return false阻止操作(复选框)
        /// </summary>
        public static string OnBeforeCheckRow = "BeforeCheckRow";
        /// <summary>
        /// 选择事件(复选框) 
        /// </summary>
        public static string OnCheckRow = "CheckRow";

        /// <summary>
        /// 选择前事件，可以通过return false阻止操作(复选框 全选/全不选)
        /// </summary>
        public static string OnBeforeCheckAllRow = "BeforeCheckAllRow";

        /// <summary>
        /// 选择事件(复选框 全选/全不选)
        /// </summary>
        public static string OnCheckAllRow = "CheckAllRow";

        /// <summary>
        /// 显示数据前事件，可以通过reutrn false阻止操作
        /// </summary>
        public static string OnBeforeShowData = "BeforeShowData";

        /// <summary>
        /// 显示完数据事件
        /// </summary>
        public static string OnAfterShowData = "AfterShowData";

        /// <summary>
        /// 错误事件
        /// </summary>
        public static string OnError = "Error";
        /// <summary>
        /// 提交前事件
        /// </summary>
        public static string OnSubmit = "Submit";
        /// <summary>
        /// 刷新事件，可以通过return false来阻止操作
        /// </summary>
        public static string OnReload = "Reload";
        /// <summary>
        /// 第一页，可以通过return false来阻止操作
        /// </summary>
        public static string OnToFirst = "ToFirst";
        /// <summary>
        /// 上一页，可以通过return false来阻止操作
        /// </summary>
        public static string OnToPrev = "ToPrev";
        /// <summary>
        /// 下一页，可以通过return false来阻止操作
        /// </summary>
        public static string OnToNext = "ToNext";
        /// <summary>
        /// 最后一页，可以通过return false来阻止操作
        /// </summary>
        public static string OnToLast = "ToLast";
        /// <summary>
        /// 增加行后事件
        /// </summary>
        public static string OnAfterAddRow = "AfterAddRow";

        /// <summary>
        /// 编辑前事件
        /// </summary>
        public static string OnBeforeEdit = "BeforeEdit";

        /// <summary>
        /// 验证编辑器结果是否通过
        /// </summary>
        public static string OnBeforeSubmitEdit = "BeforeSubmitEdit";

        /// <summary>
        /// 结束编辑后事件
        /// </summary>
        public static string OnAfterEdit = "AfterEdit";

        /// <summary>
        /// 加载时函数
        /// </summary>
        public static string OnLoading = "Loading";
        /// <summary>
        /// 加载完函数
        /// </summary>
        public static string OnLoaded = "Loaded";
        /// <summary>
        /// 右击事件
        /// </summary>
        public static string OnContextmenu = "Contextmenu"; 
    }
}
